import java.io.File;
import java.io.IOException;
import java.text.ParseException;

import etxt2db.annotators.OverlapedTagClassificationModel;
import etxt2db.api.ClassificationExecutor;
import etxt2db.api.ClassificationModel;
import etxt2db.api.ClassificationModelCreator;
import etxt2db.serialization.ClassificationModelSerializer;


public class SolutionCtxt2dbDictionary {
	public static void main(String[] args) throws IOException, ParseException{
		ClassificationModelCreator creator = new ClassificationModelCreator();
		ClassificationModel modelDic = creator.createDictionaryClassificationModel(new File("./resources/daysDictionary"));
	
		ClassificationModelSerializer serial = new ClassificationModelSerializer();
		serial.serializeClassificationModel(modelDic, "./annotators/weekdaysDictionary.bin");
		
		modelDic = serial.deserializeClassificationModel("./annotators/weekdaysDictionary.bin");
		
		ClassificationExecutor exec = new ClassificationExecutor();
		System.out.println(exec.getClassifiedString("Yesterday was Thursday, today it is Friday, tomorrow is Saturday and Sunday comes afterwards!", modelDic, null));
	}
}
